<?php

/**
 * midia components.
 *
 * @package    sispatr
 * @subpackage midia
 * @author     Foxsis
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class enderecoComponents extends sfComponentsFoxsis
{
    public function executeEndereco()
    {
        $id_name    = "id_".strtolower($this->form->getModelName());
        $id_value   = "getId".$this->form->getModelName();

        $this->reference    = $id_name;
        $this->ref_value    = $this->form->getObject()->$id_value();

        $this->midia  = EnderecoTable::carregar(array($id_name=>$this->ref_value));
    }
    
    public function executeNew(){}
}